<template>
  <a-card title="Loading - 加载提示" :bordered="false">
    <a slot="extra" target="_blank" href="http://rest-doc.easy-frame.top/front-end/components/general.html">文档地址</a>
    <p>
      添加全局的loading状态
    </p>
    <div class="btn-group">
      <a-button @click="showLoading(null)">显示Loading</a-button>
      <a-button @click="showLoading('自定义文字')">自定义文字</a-button>
    </div>
  </a-card>
</template>

<script>
export default {
  name: 'SampleComponentsGeneralLoading',
  methods: {
    showLoading (tip) {
      this.$loading.show({ tip: tip || null })

      setTimeout(() => {
        this.$loading.hide()
      }, 2000)
    }
  }
}
</script>

<style scoped>

</style>
